/**
 * @author 阮中楠
 * @classdesc
 * 表列配置对象
 * 未来的项目是可以考虑用TypeScript来定义
 * @export ColumnConfig
 * @class ColumnConfig
 */
export default class ColumnConfig {
  constructor(ColumnConfigClass = {}) {
    this.hidden = false;
    this.prop = "";
    this.label = "";
    this.isSortable = false;
    this.minWidth = "";
    this.width = "";
    this.overflow = false;
    this.align = "left";
    this.formatter = () => {};

    Object.assign(this, ColumnConfigClass);
  }

  get key() {
    return this.prop;
  }
}
